how to make a game in javascript